package Leetcode;

public class question003 {
    public static void main(String[] args) {
        Solution003 solution = new Solution003();
        System.out.println(solution.isPalindrome(121323121));
    }
}
class Solution003 {
    public boolean isPalindrome(int x) {
        if(x<0){
            return false;
        }
        int number1 = x;
        int number2 = 0;
        while(x != 0) {
            number2 = number2*10 + x%10;
            x = x/10;
        }
        return number1 == number2;
    }
}
